
    <section class="categories">
    <h2><?php echo $this->t('Popular Categories')?></h2>    
<ul>
<?php
			//get pop cat listing count
			$count_arr=array();
			$count_ojt  = Model_Category::getLevel1(array('homepage' => 1, 'status' => Model_Category::STATUS_ACTIVE))->sort(array('nav_pos' => 1))->limit(6);
			$i=0;
            foreach($count_ojt as $i => $cats):
            	
				$count_arr[] = ( number_format(intval($cats->listing_count)));
				//print_r($cats);
				//break;
			 endforeach;
			 
            //get the category list
            $list  = Model_Category::all(array('status' => Model_Category::STATUS_ACTIVE, 'path' => array('$size' => 1)))->sort(array('nav_pos' => 1))->limit(6);
            $list2 = Model_Category::all(array('status' => Model_Category::STATUS_ACTIVE, 'path' => array('$size' => 1)))->sort(array('nm_en' => 1));
            $split = $list2->count()/2;
            $i     = 0;
            $arr1 = $arr2 = array();
            foreach ($list2 as $category) {
                if ($i < $split) {
                    $arr1[] = $category;
                } else {
                    $arr2[] = $category;
                }
                $i++;
            }
            //var_dump($split, $arr1, $arr2);exit;
            ?>
            <?php 
			$x=0;
			foreach ($list as $i => $category):?>
				<?php if($category->name=="Parking") continue;?>
                <li><h1><a href="<?php echo $category->url()?>"><?php echo $this->t(empty($category->nav_name) ? $category->name : $category->nav_name ) ?><em>(<?php echo number_format(intval($category->listing_count));//$count_arr[$x];$x++;?>)</em><span>&gt;</span></a></h1></li>
            <?php endforeach;
            
		
			
			?>
    
       <li> <h1><a href="<?php echo $this->geturl('view-all','category'); ?>"><?php echo $this->t('View All')?><span>&gt;</span></a></h1></li>
</ul>
    </section>
    <section class="pick">
    <h2><?php echo $this->t("Today's Picks")?></h2>
    <ul>
    <?php
    	//print_r($this->todayspick);
    $i = 1;
    foreach($this->todayspick as $item):
	?>
		<li class="item0<?php echo $i; $i++;?>"><h1><a href="<?php echo $item->url()?>"><img src="<?php echo $this->thumbnail()->resizeAndCrop($item->featured_photo, 300, 180);//echo Ac_Util::getImageBaseUrl($item->featured_photo);?>"><span><?php echo htmlentities(preg_replace('#([\n|\r])#', '', $item->title), ENT_COMPAT, 'utf-8')?></span></a></h1></li>
	<?php	
	endforeach;
    ?>
    
    </ul>
    </section>
    <?php echo $this->Partial('mobile/other.phtml', 'default'); ?>
